<?php
/**
 * This is the template for action id `sort`.
 */

/** @var yii\web\View $this */
/** @var \console\gii\controller\Generator $generator */
/** @var string $actionCamelID */
/** @var string $controllerName */
/** @var string $modelName */
$modelName = $generator->modelName;
?>
        $model = <?= $modelName ?>::findOne($id);
        $bodyParams = $this->filteredPost;
        $model->setScenario('<?= $modelName ?>_<?= $actionCamelID ?>');
        $model->load($bodyParams);
        if ($model->save()) {
            return $this->asOk('排序成功' . "#{$id}");
        }

        return $this->asFail($model->error . "#{$id}");
